let expjwt = require("express-jwt")
let tokenAuth = expjwt({
    secret: "ryfgftlsaehjoug",
    algorithms: ["HS256"],//指定算法
    credentialIsRequired: false //拒绝无token请求
}).unless({//设置不需要验证的路径
    path: ['/users/login', '/users/register',/\/images/]
})

module.exports = tokenAuth